package cn.stylefeng.guns.modular.business.custom.enums;

public enum YesOrNoEnum {

    YES(1, "是"),
    NO(0, "否");

    YesOrNoEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getValue(Integer type) {
        if (type == null) {
            return "";
        }
        YesOrNoEnum[] pts = YesOrNoEnum.values();
        for (YesOrNoEnum pt : pts) {
            if (type == pt.type) {
                return pt.desc;
            }
        }
        return "";
    }

    public int type;

    public String desc;


}
